import java.util.ArrayList;
public class Solution {
    public ArrayList<ArrayList<Integer> > FindContinuousSequence(int sum) {
        ArrayList<ArrayList<Integer>> resultList = new ArrayList<>();
        ArrayList<Integer> list;
        int k,s;
        for(int i = (sum+1)/2; i>sum/i; i--){
            k=0;
            do {
                k = k+1;
                s = (i+i-k)*(k+1)/2;
            } while( s < sum);
            if(s==sum){
                list = new ArrayList<>();
                while(k>=0){
                    list.add(i-k);
                    k=k-1;
                }
                resultList.add(list);
            }
        }
        return resultList;
    }
}